import { createRouter, createWebHashHistory } from "vue-router";

import Layout from "@/layout/index.vue";
import Index from "@/views/index.vue"

const routes = [
  {
    path: "/",
    component: Layout,
    redirect: "/index",
    children: [
      {
        path: "index",
        component: Index,
      },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
router.beforeEach((to, form, next) => {
  next();
});
export default router;
